//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS QLDB service.
///
/// The resource management API for Amazon QLDB
public struct QLDB: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the QLDB client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "QLDB",
            serviceIdentifier: "qldb",
            serviceProtocol: .restjson,
            apiVersion: "2019-01-02",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: QLDBErrorType.self,
            xmlNamespace: "http://ledger.amazonaws.com/doc/2019-01-02/",
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "ca-central-1": "qldb-fips.ca-central-1.amazonaws.com",
            "us-east-1": "qldb-fips.us-east-1.amazonaws.com",
            "us-east-2": "qldb-fips.us-east-2.amazonaws.com",
            "us-west-2": "qldb-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Ends a given Amazon QLDB journal stream. Before a stream can be canceled, its current status must be ACTIVE. You can't restart a stream after you cancel it. Canceled QLDB stream resources are subject to a 7-day retention period, so they are automatically deleted after this limit expires.
    @Sendable
    @inlinable
    public func cancelJournalKinesisStream(_ input: CancelJournalKinesisStreamRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CancelJournalKinesisStreamResponse {
        try await self.client.execute(
            operation: "CancelJournalKinesisStream", 
            path: "/ledgers/{LedgerName}/journal-kinesis-streams/{StreamId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Ends a given Amazon QLDB journal stream. Before a stream can be canceled, its current status must be ACTIVE. You can't restart a stream after you cancel it. Canceled QLDB stream resources are subject to a 7-day retention period, so they are automatically deleted after this limit expires.
    ///
    /// Parameters:
    ///   - ledgerName: The name of the ledger.
    ///   - streamId: The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled.
    ///   - logger: Logger use during operation
    @inlinable
    public func cancelJournalKinesisStream(
        ledgerName: String,
        streamId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CancelJournalKinesisStreamResponse {
        let input = CancelJournalKinesisStreamRequest(
            ledgerName: ledgerName, 
            streamId: streamId
        )
        return try await self.cancelJournalKinesisStream(input, logger: logger)
    }

    /// Creates a new ledger in your Amazon Web Services account in the current Region.
    @Sendable
    @inlinable
    public func createLedger(_ input: CreateLedgerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateLedgerResponse {
        try await self.client.execute(
            operation: "CreateLedger", 
            path: "/ledgers", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new ledger in your Amazon Web Services account in the current Region.
    ///
    /// Parameters:
    ///   - deletionProtection: Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (true) by default. If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the UpdateLedger operation to set this parameter to false.
    ///   - kmsKey: The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see Encryption at rest in the Amazon QLDB Developer Guide. Use one of the following options to specify this parameter:    AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.    Undefined: By default, use an Amazon Web Services owned KMS key.    A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your account that you create, own, and manage. Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and asymmetric keys in the Key Management Service Developer Guide.   To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN. For example:   Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab    Alias name: alias/ExampleAlias    Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias    For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.
    ///   - name: The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region. Naming constraints for ledger names are defined in Quotas in Amazon QLDB in the Amazon QLDB Developer Guide.
    ///   - permissionsMode: The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:    ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity for ledgers. This mode allows users who have the SendCommand API permission for this ledger to run all PartiQL commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.    STANDARD: (Recommended) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands. By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the SendCommand API permission for the ledger. For information, see Getting started with the standard permissions mode in the Amazon QLDB Developer Guide.    We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger data.
    ///   - tags: The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.
    ///   - logger: Logger use during operation
    @inlinable
    public func createLedger(
        deletionProtection: Bool? = nil,
        kmsKey: String? = nil,
        name: String,
        permissionsMode: PermissionsMode,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateLedgerResponse {
        let input = CreateLedgerRequest(
            deletionProtection: deletionProtection, 
            kmsKey: kmsKey, 
            name: name, 
            permissionsMode: permissionsMode, 
            tags: tags
        )
        return try await self.createLedger(input, logger: logger)
    }

    /// Deletes a ledger and all of its contents. This action is irreversible. If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the UpdateLedger operation to set this parameter to false.
    @Sendable
    @inlinable
    public func deleteLedger(_ input: DeleteLedgerRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteLedger", 
            path: "/ledgers/{Name}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a ledger and all of its contents. This action is irreversible. If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the UpdateLedger operation to set this parameter to false.
    ///
    /// Parameters:
    ///   - name: The name of the ledger that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteLedger(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteLedgerRequest(
            name: name
        )
        return try await self.deleteLedger(input, logger: logger)
    }

    /// Returns detailed information about a given Amazon QLDB journal stream. The output includes the Amazon Resource Name (ARN), stream name, current status, creation time, and the parameters of the original stream creation request. This action does not return any expired journal streams. For more information, see Expiration for terminal streams in the Amazon QLDB Developer Guide.
    @Sendable
    @inlinable
    public func describeJournalKinesisStream(_ input: DescribeJournalKinesisStreamRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeJournalKinesisStreamResponse {
        try await self.client.execute(
            operation: "DescribeJournalKinesisStream", 
            path: "/ledgers/{LedgerName}/journal-kinesis-streams/{StreamId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns detailed information about a given Amazon QLDB journal stream. The output includes the Amazon Resource Name (ARN), stream name, current status, creation time, and the parameters of the original stream creation request. This action does not return any expired journal streams. For more information, see Expiration for terminal streams in the Amazon QLDB Developer Guide.
    ///
    /// Parameters:
    ///   - ledgerName: The name of the ledger.
    ///   - streamId: The UUID (represented in Base62-encoded text) of the QLDB journal stream to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeJournalKinesisStream(
        ledgerName: String,
        streamId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeJournalKinesisStreamResponse {
        let input = DescribeJournalKinesisStreamRequest(
            ledgerName: ledgerName, 
            streamId: streamId
        )
        return try await self.describeJournalKinesisStream(input, logger: logger)
    }

    /// Returns information about a journal export job, including the ledger name, export ID, creation time, current status, and the parameters of the original export creation request. This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide. If the export job with the given ExportId doesn't exist, then throws ResourceNotFoundException. If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException.
    @Sendable
    @inlinable
    public func describeJournalS3Export(_ input: DescribeJournalS3ExportRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeJournalS3ExportResponse {
        try await self.client.execute(
            operation: "DescribeJournalS3Export", 
            path: "/ledgers/{Name}/journal-s3-exports/{ExportId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about a journal export job, including the ledger name, export ID, creation time, current status, and the parameters of the original export creation request. This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide. If the export job with the given ExportId doesn't exist, then throws ResourceNotFoundException. If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException.
    ///
    /// Parameters:
    ///   - exportId: The UUID (represented in Base62-encoded text) of the journal export job to describe.
    ///   - name: The name of the ledger.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeJournalS3Export(
        exportId: String,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeJournalS3ExportResponse {
        let input = DescribeJournalS3ExportRequest(
            exportId: exportId, 
            name: name
        )
        return try await self.describeJournalS3Export(input, logger: logger)
    }

    /// Returns information about a ledger, including its state, permissions mode, encryption at rest settings, and when it was created.
    @Sendable
    @inlinable
    public func describeLedger(_ input: DescribeLedgerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeLedgerResponse {
        try await self.client.execute(
            operation: "DescribeLedger", 
            path: "/ledgers/{Name}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about a ledger, including its state, permissions mode, encryption at rest settings, and when it was created.
    ///
    /// Parameters:
    ///   - name: The name of the ledger that you want to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeLedger(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeLedgerResponse {
        let input = DescribeLedgerRequest(
            name: name
        )
        return try await self.describeLedger(input, logger: logger)
    }

    /// Exports journal contents within a date and time range from a ledger into a specified Amazon Simple Storage Service (Amazon S3) bucket. A journal export job can write the data objects in either the text or binary representation of Amazon Ion format, or in JSON Lines text format. If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException. If the ledger with the given Name is in CREATING status, then throws ResourcePreconditionNotMetException. You can initiate up to two concurrent journal export requests for each ledger. Beyond this limit, journal export requests throw LimitExceededException.
    @Sendable
    @inlinable
    public func exportJournalToS3(_ input: ExportJournalToS3Request, logger: Logger = AWSClient.loggingDisabled) async throws -> ExportJournalToS3Response {
        try await self.client.execute(
            operation: "ExportJournalToS3", 
            path: "/ledgers/{Name}/journal-s3-exports", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Exports journal contents within a date and time range from a ledger into a specified Amazon Simple Storage Service (Amazon S3) bucket. A journal export job can write the data objects in either the text or binary representation of Amazon Ion format, or in JSON Lines text format. If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException. If the ledger with the given Name is in CREATING status, then throws ResourcePreconditionNotMetException. You can initiate up to two concurrent journal export requests for each ledger. Beyond this limit, journal export requests throw LimitExceededException.
    ///
    /// Parameters:
    ///   - exclusiveEndTime: The exclusive end date and time for the range of journal contents to export. The ExclusiveEndTime must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z. The ExclusiveEndTime must be less than or equal to the current UTC date and time.
    ///   - inclusiveStartTime: The inclusive start date and time for the range of journal contents to export. The InclusiveStartTime must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z. The InclusiveStartTime must be before ExclusiveEndTime. If you provide an InclusiveStartTime that is before the ledger's CreationDateTime, Amazon QLDB defaults it to the ledger's CreationDateTime.
    ///   - name: The name of the ledger.
    ///   - outputFormat: The output format of your exported journal data. A journal export job can write the data objects in either the text or binary representation of Amazon Ion format, or in JSON Lines text format. Default: ION_TEXT  In JSON Lines format, each journal block in an exported data object is a valid JSON object that is delimited by a newline. You can use this format to directly integrate JSON exports with analytics tools such as Amazon Athena and Glue because these services can parse newline-delimited JSON automatically.
    ///   - roleArn: The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:   Write objects into your Amazon S3 bucket.   (Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.   To pass a role to QLDB when requesting a journal export, you must have permissions to perform the iam:PassRole action on the IAM role resource. This is required for all journal export requests.
    ///   - s3ExportConfiguration: The configuration settings of the Amazon S3 bucket destination for your export request.
    ///   - logger: Logger use during operation
    @inlinable
    public func exportJournalToS3(
        exclusiveEndTime: Date,
        inclusiveStartTime: Date,
        name: String,
        outputFormat: OutputFormat? = nil,
        roleArn: String,
        s3ExportConfiguration: S3ExportConfiguration,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ExportJournalToS3Response {
        let input = ExportJournalToS3Request(
            exclusiveEndTime: exclusiveEndTime, 
            inclusiveStartTime: inclusiveStartTime, 
            name: name, 
            outputFormat: outputFormat, 
            roleArn: roleArn, 
            s3ExportConfiguration: s3ExportConfiguration
        )
        return try await self.exportJournalToS3(input, logger: logger)
    }

    /// Returns a block object at a specified address in a journal. Also returns a proof of the specified block for verification if DigestTipAddress is provided. For information about the data contents in a block, see Journal contents in the Amazon QLDB Developer Guide. If the specified ledger doesn't exist or is in DELETING status, then throws ResourceNotFoundException. If the specified ledger is in CREATING status, then throws ResourcePreconditionNotMetException. If no block exists with the specified address, then throws InvalidParameterException.
    @Sendable
    @inlinable
    public func getBlock(_ input: GetBlockRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetBlockResponse {
        try await self.client.execute(
            operation: "GetBlock", 
            path: "/ledgers/{Name}/block", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a block object at a specified address in a journal. Also returns a proof of the specified block for verification if DigestTipAddress is provided. For information about the data contents in a block, see Journal contents in the Amazon QLDB Developer Guide. If the specified ledger doesn't exist or is in DELETING status, then throws ResourceNotFoundException. If the specified ledger is in CREATING status, then throws ResourcePreconditionNotMetException. If no block exists with the specified address, then throws InvalidParameterException.
    ///
    /// Parameters:
    ///   - blockAddress: The location of the block that you want to request. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo. For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}.
    ///   - digestTipAddress: The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo. For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}.
    ///   - name: The name of the ledger.
    ///   - logger: Logger use during operation
    @inlinable
    public func getBlock(
        blockAddress: ValueHolder,
        digestTipAddress: ValueHolder? = nil,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetBlockResponse {
        let input = GetBlockRequest(
            blockAddress: blockAddress, 
            digestTipAddress: digestTipAddress, 
            name: name
        )
        return try await self.getBlock(input, logger: logger)
    }

    /// Returns the digest of a ledger at the latest committed block in the journal. The response includes a 256-bit hash value and a block address.
    @Sendable
    @inlinable
    public func getDigest(_ input: GetDigestRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDigestResponse {
        try await self.client.execute(
            operation: "GetDigest", 
            path: "/ledgers/{Name}/digest", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the digest of a ledger at the latest committed block in the journal. The response includes a 256-bit hash value and a block address.
    ///
    /// Parameters:
    ///   - name: The name of the ledger.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDigest(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDigestResponse {
        let input = GetDigestRequest(
            name: name
        )
        return try await self.getDigest(input, logger: logger)
    }

    /// Returns a revision data object for a specified document ID and block address. Also returns a proof of the specified revision for verification if DigestTipAddress is provided.
    @Sendable
    @inlinable
    public func getRevision(_ input: GetRevisionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRevisionResponse {
        try await self.client.execute(
            operation: "GetRevision", 
            path: "/ledgers/{Name}/revision", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a revision data object for a specified document ID and block address. Also returns a proof of the specified revision for verification if DigestTipAddress is provided.
    ///
    /// Parameters:
    ///   - blockAddress: The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo. For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}.
    ///   - digestTipAddress: The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo. For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}.
    ///   - documentId: The UUID (represented in Base62-encoded text) of the document to be verified.
    ///   - name: The name of the ledger.
    ///   - logger: Logger use during operation
    @inlinable
    public func getRevision(
        blockAddress: ValueHolder,
        digestTipAddress: ValueHolder? = nil,
        documentId: String,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRevisionResponse {
        let input = GetRevisionRequest(
            blockAddress: blockAddress, 
            digestTipAddress: digestTipAddress, 
            documentId: documentId, 
            name: name
        )
        return try await self.getRevision(input, logger: logger)
    }

    /// Returns all Amazon QLDB journal streams for a given ledger. This action does not return any expired journal streams. For more information, see Expiration for terminal streams in the Amazon QLDB Developer Guide. This action returns a maximum of MaxResults items. It is paginated so that you can retrieve all the items by calling ListJournalKinesisStreamsForLedger multiple times.
    @Sendable
    @inlinable
    public func listJournalKinesisStreamsForLedger(_ input: ListJournalKinesisStreamsForLedgerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListJournalKinesisStreamsForLedgerResponse {
        try await self.client.execute(
            operation: "ListJournalKinesisStreamsForLedger", 
            path: "/ledgers/{LedgerName}/journal-kinesis-streams", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns all Amazon QLDB journal streams for a given ledger. This action does not return any expired journal streams. For more information, see Expiration for terminal streams in the Amazon QLDB Developer Guide. This action returns a maximum of MaxResults items. It is paginated so that you can retrieve all the items by calling ListJournalKinesisStreamsForLedger multiple times.
    ///
    /// Parameters:
    ///   - ledgerName: The name of the ledger.
    ///   - maxResults: The maximum number of results to return in a single ListJournalKinesisStreamsForLedger request. (The actual number of results returned might be fewer.)
    ///   - nextToken: A pagination token, indicating that you want to retrieve the next page of results. If you received a value for NextToken in the response from a previous ListJournalKinesisStreamsForLedger call, you should use that value as input here.
    ///   - logger: Logger use during operation
    @inlinable
    public func listJournalKinesisStreamsForLedger(
        ledgerName: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListJournalKinesisStreamsForLedgerResponse {
        let input = ListJournalKinesisStreamsForLedgerRequest(
            ledgerName: ledgerName, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listJournalKinesisStreamsForLedger(input, logger: logger)
    }

    /// Returns all journal export jobs for all ledgers that are associated with the current Amazon Web Services account and Region. This action returns a maximum of MaxResults items, and is paginated so that you can retrieve all the items by calling ListJournalS3Exports multiple times. This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide.
    @Sendable
    @inlinable
    public func listJournalS3Exports(_ input: ListJournalS3ExportsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListJournalS3ExportsResponse {
        try await self.client.execute(
            operation: "ListJournalS3Exports", 
            path: "/journal-s3-exports", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns all journal export jobs for all ledgers that are associated with the current Amazon Web Services account and Region. This action returns a maximum of MaxResults items, and is paginated so that you can retrieve all the items by calling ListJournalS3Exports multiple times. This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return in a single ListJournalS3Exports request. (The actual number of results returned might be fewer.)
    ///   - nextToken: A pagination token, indicating that you want to retrieve the next page of results. If you received a value for NextToken in the response from a previous ListJournalS3Exports call, then you should use that value as input here.
    ///   - logger: Logger use during operation
    @inlinable
    public func listJournalS3Exports(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListJournalS3ExportsResponse {
        let input = ListJournalS3ExportsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listJournalS3Exports(input, logger: logger)
    }

    /// Returns all journal export jobs for a specified ledger. This action returns a maximum of MaxResults items, and is paginated so that you can retrieve all the items by calling ListJournalS3ExportsForLedger multiple times. This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide.
    @Sendable
    @inlinable
    public func listJournalS3ExportsForLedger(_ input: ListJournalS3ExportsForLedgerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListJournalS3ExportsForLedgerResponse {
        try await self.client.execute(
            operation: "ListJournalS3ExportsForLedger", 
            path: "/ledgers/{Name}/journal-s3-exports", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns all journal export jobs for a specified ledger. This action returns a maximum of MaxResults items, and is paginated so that you can retrieve all the items by calling ListJournalS3ExportsForLedger multiple times. This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return in a single ListJournalS3ExportsForLedger request. (The actual number of results returned might be fewer.)
    ///   - name: The name of the ledger.
    ///   - nextToken: A pagination token, indicating that you want to retrieve the next page of results. If you received a value for NextToken in the response from a previous ListJournalS3ExportsForLedger call, then you should use that value as input here.
    ///   - logger: Logger use during operation
    @inlinable
    public func listJournalS3ExportsForLedger(
        maxResults: Int? = nil,
        name: String,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListJournalS3ExportsForLedgerResponse {
        let input = ListJournalS3ExportsForLedgerRequest(
            maxResults: maxResults, 
            name: name, 
            nextToken: nextToken
        )
        return try await self.listJournalS3ExportsForLedger(input, logger: logger)
    }

    /// Returns all ledgers that are associated with the current Amazon Web Services account and Region. This action returns a maximum of MaxResults items and is paginated so that you can retrieve all the items by calling ListLedgers multiple times.
    @Sendable
    @inlinable
    public func listLedgers(_ input: ListLedgersRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListLedgersResponse {
        try await self.client.execute(
            operation: "ListLedgers", 
            path: "/ledgers", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns all ledgers that are associated with the current Amazon Web Services account and Region. This action returns a maximum of MaxResults items and is paginated so that you can retrieve all the items by calling ListLedgers multiple times.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return in a single ListLedgers request. (The actual number of results returned might be fewer.)
    ///   - nextToken: A pagination token, indicating that you want to retrieve the next page of results. If you received a value for NextToken in the response from a previous ListLedgers call, then you should use that value as input here.
    ///   - logger: Logger use during operation
    @inlinable
    public func listLedgers(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListLedgersResponse {
        let input = ListLedgersRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listLedgers(input, logger: logger)
    }

    /// Returns all tags for a specified Amazon QLDB resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns all tags for a specified Amazon QLDB resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for which to list the tags. For example:  arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Creates a journal stream for a given Amazon QLDB ledger. The stream captures every document revision that is committed to the ledger's journal and delivers the data to a specified Amazon Kinesis Data Streams resource.
    @Sendable
    @inlinable
    public func streamJournalToKinesis(_ input: StreamJournalToKinesisRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StreamJournalToKinesisResponse {
        try await self.client.execute(
            operation: "StreamJournalToKinesis", 
            path: "/ledgers/{LedgerName}/journal-kinesis-streams", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a journal stream for a given Amazon QLDB ledger. The stream captures every document revision that is committed to the ledger's journal and delivers the data to a specified Amazon Kinesis Data Streams resource.
    ///
    /// Parameters:
    ///   - exclusiveEndTime: The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it. The ExclusiveEndTime must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z.
    ///   - inclusiveStartTime: The inclusive start date and time from which to start streaming journal data. This parameter must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z. The InclusiveStartTime cannot be in the future and must be before ExclusiveEndTime. If you provide an InclusiveStartTime that is before the ledger's CreationDateTime, QLDB effectively defaults it to the ledger's CreationDateTime.
    ///   - kinesisConfiguration: The configuration settings of the Kinesis Data Streams destination for your stream request.
    ///   - ledgerName: The name of the ledger.
    ///   - roleArn: The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource. To pass a role to QLDB when requesting a journal stream, you must have permissions to perform the iam:PassRole action on the IAM role resource. This is required for all journal stream requests.
    ///   - streamName: The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream. Your stream name must be unique among other active streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in Quotas in Amazon QLDB in the Amazon QLDB Developer Guide.
    ///   - tags: The key-value pairs to add as tags to the stream that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.
    ///   - logger: Logger use during operation
    @inlinable
    public func streamJournalToKinesis(
        exclusiveEndTime: Date? = nil,
        inclusiveStartTime: Date,
        kinesisConfiguration: KinesisConfiguration,
        ledgerName: String,
        roleArn: String,
        streamName: String,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StreamJournalToKinesisResponse {
        let input = StreamJournalToKinesisRequest(
            exclusiveEndTime: exclusiveEndTime, 
            inclusiveStartTime: inclusiveStartTime, 
            kinesisConfiguration: kinesisConfiguration, 
            ledgerName: ledgerName, 
            roleArn: roleArn, 
            streamName: streamName, 
            tags: tags
        )
        return try await self.streamJournalToKinesis(input, logger: logger)
    }

    /// Adds one or more tags to a specified Amazon QLDB resource. A resource can have up to 50 tags. If you try to create more than 50 tags for a resource, your request fails and returns an error.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds one or more tags to a specified Amazon QLDB resource. A resource can have up to 50 tags. If you try to create more than 50 tags for a resource, your request fails and returns an error.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) to which you want to add the tags. For example:  arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger
    ///   - tags: The key-value pairs to add as tags to the specified QLDB resource. Tag keys are case sensitive. If you specify a key that already exists for the resource, your request fails and returns an error. Tag values are case sensitive and can be null.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes one or more tags from a specified Amazon QLDB resource. You can specify up to 50 tag keys to remove.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from a specified Amazon QLDB resource. You can specify up to 50 tag keys to remove.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) from which to remove the tags. For example:  arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger
    ///   - tagKeys: The list of tag keys to remove.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates properties on a ledger.
    @Sendable
    @inlinable
    public func updateLedger(_ input: UpdateLedgerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateLedgerResponse {
        try await self.client.execute(
            operation: "UpdateLedger", 
            path: "/ledgers/{Name}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates properties on a ledger.
    ///
    /// Parameters:
    ///   - deletionProtection: Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (true) by default. If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the UpdateLedger operation to set this parameter to false.
    ///   - kmsKey: The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see Encryption at rest in the Amazon QLDB Developer Guide. Use one of the following options to specify this parameter:    AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.    Undefined: Make no changes to the KMS key of the ledger.    A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your account that you create, own, and manage. Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and asymmetric keys in the Key Management Service Developer Guide.   To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN. For example:   Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab    Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab    Alias name: alias/ExampleAlias    Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias    For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.
    ///   - name: The name of the ledger.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateLedger(
        deletionProtection: Bool? = nil,
        kmsKey: String? = nil,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateLedgerResponse {
        let input = UpdateLedgerRequest(
            deletionProtection: deletionProtection, 
            kmsKey: kmsKey, 
            name: name
        )
        return try await self.updateLedger(input, logger: logger)
    }

    /// Updates the permissions mode of a ledger.  Before you switch to the STANDARD permissions mode, you must first create all required IAM policies and table tags to avoid disruption to your users. To learn more, see Migrating to the standard permissions mode in the Amazon QLDB Developer Guide.
    @Sendable
    @inlinable
    public func updateLedgerPermissionsMode(_ input: UpdateLedgerPermissionsModeRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateLedgerPermissionsModeResponse {
        try await self.client.execute(
            operation: "UpdateLedgerPermissionsMode", 
            path: "/ledgers/{Name}/permissions-mode", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the permissions mode of a ledger.  Before you switch to the STANDARD permissions mode, you must first create all required IAM policies and table tags to avoid disruption to your users. To learn more, see Migrating to the standard permissions mode in the Amazon QLDB Developer Guide.
    ///
    /// Parameters:
    ///   - name: The name of the ledger.
    ///   - permissionsMode: The permissions mode to assign to the ledger. This parameter can have one of the following values:    ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity for ledgers. This mode allows users who have the SendCommand API permission for this ledger to run all PartiQL commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.    STANDARD: (Recommended) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands. By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the SendCommand API permission for the ledger. For information, see Getting started with the standard permissions mode in the Amazon QLDB Developer Guide.    We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger data.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateLedgerPermissionsMode(
        name: String,
        permissionsMode: PermissionsMode,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateLedgerPermissionsModeResponse {
        let input = UpdateLedgerPermissionsModeRequest(
            name: name, 
            permissionsMode: permissionsMode
        )
        return try await self.updateLedgerPermissionsMode(input, logger: logger)
    }
}

extension QLDB {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: QLDB, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension QLDB {
    /// Return PaginatorSequence for operation ``listJournalKinesisStreamsForLedger(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listJournalKinesisStreamsForLedgerPaginator(
        _ input: ListJournalKinesisStreamsForLedgerRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListJournalKinesisStreamsForLedgerRequest, ListJournalKinesisStreamsForLedgerResponse> {
        return .init(
            input: input,
            command: self.listJournalKinesisStreamsForLedger,
            inputKey: \ListJournalKinesisStreamsForLedgerRequest.nextToken,
            outputKey: \ListJournalKinesisStreamsForLedgerResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listJournalKinesisStreamsForLedger(_:logger:)``.
    ///
    /// - Parameters:
    ///   - ledgerName: The name of the ledger.
    ///   - maxResults: The maximum number of results to return in a single ListJournalKinesisStreamsForLedger request. (The actual number of results returned might be fewer.)
    ///   - logger: Logger used for logging
    @inlinable
    public func listJournalKinesisStreamsForLedgerPaginator(
        ledgerName: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListJournalKinesisStreamsForLedgerRequest, ListJournalKinesisStreamsForLedgerResponse> {
        let input = ListJournalKinesisStreamsForLedgerRequest(
            ledgerName: ledgerName, 
            maxResults: maxResults
        )
        return self.listJournalKinesisStreamsForLedgerPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listJournalS3Exports(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listJournalS3ExportsPaginator(
        _ input: ListJournalS3ExportsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListJournalS3ExportsRequest, ListJournalS3ExportsResponse> {
        return .init(
            input: input,
            command: self.listJournalS3Exports,
            inputKey: \ListJournalS3ExportsRequest.nextToken,
            outputKey: \ListJournalS3ExportsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listJournalS3Exports(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return in a single ListJournalS3Exports request. (The actual number of results returned might be fewer.)
    ///   - logger: Logger used for logging
    @inlinable
    public func listJournalS3ExportsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListJournalS3ExportsRequest, ListJournalS3ExportsResponse> {
        let input = ListJournalS3ExportsRequest(
            maxResults: maxResults
        )
        return self.listJournalS3ExportsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listJournalS3ExportsForLedger(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listJournalS3ExportsForLedgerPaginator(
        _ input: ListJournalS3ExportsForLedgerRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListJournalS3ExportsForLedgerRequest, ListJournalS3ExportsForLedgerResponse> {
        return .init(
            input: input,
            command: self.listJournalS3ExportsForLedger,
            inputKey: \ListJournalS3ExportsForLedgerRequest.nextToken,
            outputKey: \ListJournalS3ExportsForLedgerResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listJournalS3ExportsForLedger(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return in a single ListJournalS3ExportsForLedger request. (The actual number of results returned might be fewer.)
    ///   - name: The name of the ledger.
    ///   - logger: Logger used for logging
    @inlinable
    public func listJournalS3ExportsForLedgerPaginator(
        maxResults: Int? = nil,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListJournalS3ExportsForLedgerRequest, ListJournalS3ExportsForLedgerResponse> {
        let input = ListJournalS3ExportsForLedgerRequest(
            maxResults: maxResults, 
            name: name
        )
        return self.listJournalS3ExportsForLedgerPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listLedgers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listLedgersPaginator(
        _ input: ListLedgersRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListLedgersRequest, ListLedgersResponse> {
        return .init(
            input: input,
            command: self.listLedgers,
            inputKey: \ListLedgersRequest.nextToken,
            outputKey: \ListLedgersResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listLedgers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return in a single ListLedgers request. (The actual number of results returned might be fewer.)
    ///   - logger: Logger used for logging
    @inlinable
    public func listLedgersPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListLedgersRequest, ListLedgersResponse> {
        let input = ListLedgersRequest(
            maxResults: maxResults
        )
        return self.listLedgersPaginator(input, logger: logger)
    }
}

extension QLDB.ListJournalKinesisStreamsForLedgerRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> QLDB.ListJournalKinesisStreamsForLedgerRequest {
        return .init(
            ledgerName: self.ledgerName,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension QLDB.ListJournalS3ExportsForLedgerRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> QLDB.ListJournalS3ExportsForLedgerRequest {
        return .init(
            maxResults: self.maxResults,
            name: self.name,
            nextToken: token
        )
    }
}

extension QLDB.ListJournalS3ExportsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> QLDB.ListJournalS3ExportsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension QLDB.ListLedgersRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> QLDB.ListLedgersRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
